package o;

import android.content.Context;
import android.text.SpannableString;
import android.text.style.TextAppearanceSpan;
import android.widget.TextView;
import o.axa.h;
import o.ckl.d;

public class ayr {
    public static void ॱ(Context context, SpannableString spannableString, TextView textView, String str, String str2, d dVar) {
        if (dof.ˋ(str) || dof.ˋ(str2)) {
            awg.ˎ.ˏ("AgreementSpanUtils", "text is blank.");
            return;
        }
        int lastIndexOf = str.lastIndexOf(str2);
        if (lastIndexOf != -1) {
            int length = lastIndexOf + str2.length();
            ckl o_ckl = new ckl(context);
            o_ckl.ˏ(dVar);
            spannableString.setSpan(o_ckl, lastIndexOf, length, 33);
            spannableString.setSpan(new TextAppearanceSpan(context.getString(h.ˊ), 1, (int) textView.getTextSize(), null, null), lastIndexOf, length, 33);
        }
    }
}
